import com.gzlg.JdbcUtils;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

public class Demo {
    public static void main(String[] args)throws SQLException{
        Connection conn = JdbcUtils.getConnection();
        Statement statement = conn.createStatement();
        String sql="select * from stu";
        ResultSet rs=statement.executeQuery(sql);
        while (rs.next()){
            System.out.println(rs.getInt(1)+" "+rs.getString(2)+" "+rs.getString(3));
        }
    }
}
